<?php

function do_application1() {

	
	include ('fen_fns.php');
	?>
	
	
	
	<script type="text/javascript">
	


    	$(document).ready(function() {


            $.ajax({
            	type: 'GET',
            	url: 'applications/list_applications.php?yid=1',
            	data: 'url=buzeb.bahcesehir.edu.tr',	 
            	beforeSend:function(){
            	    // this is where we append a loading image
            	    $('#newApplications').html('<img class="spinner" src="images/spinner.gif" alt="Loading..." />');
            	  },  
            	success: function(ajaxCevap) {
            		$('#newApplications').html(ajaxCevap);
            	}
            });


            $(function() {
				$("a").click(function(){

				var value = $(this).attr('value');

				if (value == '1') {
					$('#1').removeClass();
					$('#1').addClass('tabActiveHeadBack');
					$('#2').removeClass();
					$('#2').addClass('tabDeactiveHeadBack');
				} else if (value == '2') {
					$('#2').removeClass();
					$('#2').addClass('tabActiveHeadBack');
					$('#1').removeClass();
					$('#1').addClass('tabDeactiveHeadBack');
				}
				
				$.ajax({
	            	type: 'GET',
	            	url: 'applications/list_applications.php?yid='+value,
	            	data: 'url=buzeb.bahcesehir.edu.tr',	 
	            	beforeSend:function(){
	            	    // this is where we append a loading image
	            	    $('#newApplications').html('<img class="spinner" src="images/spinner.gif" alt="Loading..." />');
	            	  },  
	            	success: function(ajaxCevap) {
	            		$('#newApplications').html(ajaxCevap);
	            	}
	            });
			});
			});


		});

	</script>

	
	<div class="contentMain">
	
		<br><br>
	
		<div class="showtable">
						
			<div id="summaryTableBigTopBackground">

				<a id="1" class="tabActiveHeadBack" value="1">Yayın Teşvik Müracaatları</a>
<?php 
				if ($_SESSION['access_level'] >= 100) {
?>
				<a id="2" class="tabDeactiveHeadBack" value="2">Komisyonda Bekleyen Müracaatlar</a>
<?php 
				}	
?>				

			</div>
			<div id="newApplications"></div>
			
			
	
		</div>

	</div>




<?php

}